package sg.edu.ntu.metaweb.storage.data;

import java.util.ArrayList;
import java.util.Date;

public class Comment extends Contribution {

	private String text;
	private ArrayList<Comment> replies;
	private Date timestamp;
	
	
	public Comment(User commentator, String text) {
		super(commentator);
		this.text = text;
		this.replies = new ArrayList<Comment>();
		this.timestamp = new Date();
	}
	
	
	
	public boolean addReply(Comment comment) {
		return this.replies.add(comment);
	}
	
	public boolean addReply(User commentator, String text) {
		Comment reply = new Comment(commentator, text);
		return this.replies.add(reply);
	}
	
}
